package com.qf.exHandler;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@ResponseBody
public class MyExceptionHandler {
    @ExceptionHandler({
            RuntimeException.class
    })
    public String handlerException(RuntimeException e){
        e.printStackTrace();
        return "hahah";
    }
}
